Update MCP Rate Limit
Used to update MCP (Model Context Protocol) server rate limiting configuration. This allows you to control the rate at which requests are sent to the MCP server, preventing overload and ensuring compliance with the server's usage policies.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/tools/mcp-rate-limit/{tool_id} |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/tools/mcp-rate-limit/{tool_id}?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"Enabled": true,
"RequestsPerMinute": 100,
"RequestsPerHour": 6000,
"BurstSize": 10
}'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tool_id | string | Yes | The unique identifier of the MCP server tool. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| project_key | string | No | The project key for your project. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
| Content-Type | application/json | Yes | Data type, must be application/json. |
Request Body
Request Body Schema
{
"Enabled": false,
"RequestsPerMinute": 100,
"RequestsPerHour": 6000,
"BurstSize": 10
}
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| Enabled | boolean | No | Whether rate limiting is enabled (default: false). |
| RequestsPerMinute | integer | No | Maximum number of requests allowed per minute (default: 100). |
| RequestsPerHour | integer | No | Maximum number of requests allowed per hour (default: 6000). |
| BurstSize | integer | No | Maximum number of requests allowed in a burst (default: 10). |
note
Rate Limiting Configuration
- Enabled: When disabled, no rate limiting is applied to MCP server requests
- RequestsPerMinute: Controls short-term request rate to prevent overwhelming the server
- RequestsPerHour: Enforces longer-term usage limits aligned with server policies
- BurstSize: Allows temporary spikes in traffic while maintaining overall rate limits
- Rate limits are applied per MCP server tool, not globally across all tools
tip
Best practices for rate limiting:
- Enable rate limiting to protect both your application and the MCP server
- Set RequestsPerMinute based on the MCP server's documented limits
- Configure BurstSize to handle legitimate traffic spikes without hitting limits
- Monitor rate limit metrics to optimize settings
- Use conservative limits initially and adjust based on actual usage patterns
The system will:
- Apply rate limits immediately after configuration
- Queue requests that exceed the rate limit
- Return rate limit errors if queues become full
- Track rate limit metrics for monitoring
- Automatically reset counters at the appropriate intervals
Response
Success Response (200 OK)
Returns an object containing the update status.
{
"is_success": true,
"item_id": "mcp_server_123",
"detail": "MCP rate limit configuration updated successfully",
"error": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| is_success | boolean | Indicates whether the update was successful. |
| item_id | string | The identifier of the MCP server tool. |
| detail | string | Success or failure message with additional context. |
| error | object | Error details if the operation failed (empty if successful). |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request body is invalid.
{
"detail": [
{
"loc": [
"body",
"RequestsPerMinute"
],
"msg": "ensure this value is greater than 0",
"type": "value_error.number.not_gt"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., body field). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid rate limit configuration | Bad Request |
| 404 | Not Found - MCP server tool does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |